package com.dk.service.impl;

import com.dk.pojo.AdvertisingPrice;
import com.dk.mapper.AdvertisingPriceMapper;
import com.dk.service.AdvertisingPriceService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 张成涛
 * @since 2021-08-12
 */
@Service
public class AdvertisingPriceServiceImpl extends ServiceImpl<AdvertisingPriceMapper, AdvertisingPrice> implements AdvertisingPriceService {
    @Autowired
    private AdvertisingPriceMapper advertisingPriceMapper;

    @Override
    public List<AdvertisingPrice> toSelect() {
        return advertisingPriceMapper.selectList(null);
    }

    @Override
    public void toInster(AdvertisingPrice advertisingPrice) {
        advertisingPriceMapper.insert(advertisingPrice);
    }

    @Override
    public void toUpdate(AdvertisingPrice advertisingPrice) {
        advertisingPriceMapper.updateById(advertisingPrice);
    }

    @Override
    public void toDelete(Integer advertisingId) {
        advertisingPriceMapper.deleteById(advertisingId);
    }
}
